@extends('d.layout.index')
@section('con')
<div class="mws-panel grid_8">
    <div class="mws-panel-header">
        <span><i class="icon-table"></i> 友情链接浏览</span>
    </div>
    <div class="mws-panel-body no-padding">
        <div role="grid" class="dataTables_wrapper" id="DataTables_Table_1_wrapper">
        <div id="DataTables_Table_1_length" class="dataTables_length">
            <form action="/admin/friendLink/index" method='get'>
            <!-- 分页大小 -->
            <label>显示 
                <select name="num" size="1" aria-controls="DataTables_Table_1">
                    <!-- 维持分页大小的状态 -->
                    <option value="5"  @if (isset($request['num']) && $request['num']==5)selected @endif>5</option>
                    <option value="10" @if (isset($request['num']) && $request['num']==10)selected @endif>10</option>
                    <option value="25" @if (isset($request['num']) && $request['num']==25)selected @endif>25</option>
                    <option value="50" @if (isset($request['num']) && $request['num']==50)selected @endif>50</option>
                    <option value="100" @if (isset($request['num']) && $request['num']==100)selected @endif>100</option>
                </select> 条
            </label>
        </div>
        <div class="dataTables_filter" id="DataTables_Table_1_filter">
            <!-- 搜索 -->
        <label>搜索: 
            <input type="text" name='keywords' value='@if(isset($request["keywords"])){{$request["keywords"]}} @endif' aria-controls="DataTables_Table_1">
            <input type="submit" class='btn btn-paimary' value='提交'/>
        </label>
        </div>
        </form>
        <table class="mws-datatable-fn mws-table dataTable" id="DataTables_Table_1" aria-describedby="DataTables_Table_1_info">
            <thead>
                <tr role="row"><th class="sorting_asc" role="columnheader" tabindex="0" aria-controls="DataTables_Table_1" rowspan="1" colspan="1" style="width: 141px;" aria-sort="ascending" aria-label="Rendering engine: activate to sort column descending">ID</th>
                <th class="sorting" role="columnheader" tabindex="0" aria-controls="DataTables_Table_1" rowspan="1" colspan="1" style="width: 193px;" aria-label="Browser: activate to sort column ascending">网站名称</th>
                <th class="sorting" role="columnheader" tabindex="0" aria-controls="DataTables_Table_1" rowspan="1" colspan="1" style="width: 179px;" aria-label="Platform(s): activate to sort column ascending">网站地址</th>
                <th class="sorting" role="columnheader" tabindex="0" aria-controls="DataTables_Table_1" rowspan="1" colspan="1" style="width: 179px;" aria-label="Platform(s): activate to sort column ascending">网站描述</th>
                <th class="sorting" role="columnheader" tabindex="0" aria-controls="DataTables_Table_1" rowspan="1" colspan="1" style="width: 120px;" aria-label="Engine version: activate to sort column ascending">网站排序</th>
                <th class="sorting" role="columnheader" tabindex="0" aria-controls="DataTables_Table_1" rowspan="1" colspan="1" style="width: 86px;" aria-label="CSS grade: activate to sort column ascending">操作</th></tr>
            </thead>
            
        <tbody role="alert" aria-live="polite" aria-relevant="all">
            @foreach($list as $k=>$v) 
                @if($k%2==0)
                <tr class="even">  
                @else
                <tr class="odd">  
                @endif              
                    <td class="  sorting_1">{{$v['id']}}</td>
                    <td class=" ">{{$v['name']}}</td>
                    <td class=" ">{{$v['url']}}</td>
                    <td class=" ">{{$v['desc']}}</td>
                    <td class=" ">{{$v['order']}}</td>
                    <td class=" ">
                        <a href="/admin/friendLink/delete/{{$v['id']}}" class='icon-trash' style="font-size:20px"></a><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
                        <a href="/admin/friendLink/edit/{{$v['id']}}" class='icon-tools' style="font-size:20px"></a>
                    </td>
                </tr>
            @endforeach
        </tbody>
        </table>

        <!-- 分页程序 -->
        
        <div class="dataTables_paginate paging_full_numbers" id="page">
            <!-- appends()注入参数 给跳转添加num参数 -->
            {!!$list->appends($request)->render()!!}
        </div>
        </div>
    </div>
</div>
@endsection